<template>
  <div class="yong">
    <img
      src="https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg"
      alt=""
    />
    <p :style="{ 'background-color': pom}" @click="btn">勇士冠军</p>
  </div>
</template>

<script>
export default {
    data () {
        return {
                pom:""
        }
    },methods: {

        btn(){
            console.log(1);
            this.pom=`rgb(${Math.floor(Math.random()*256)},
            ${Math.floor(Math.random()*256)},
            ${Math.floor(Math.random()*256)})`
        }
    }
};
</script>

<style>
img {
  width: 100%;
  height: 200px;
}
.yong {
  width: 320px;
  height: 259px;
  border: solid 1px #000;
  float: left;
  text-align: center;
}
</style>